Thread: undefined reference to `_impure_ptr'

  1. #1
    Registered User Sargnagel's Avatar
    Join Date
    Aug 2002
    Posts
    166

    Question undefined reference to `_impure_ptr'

    I want to use a generic data structures library ( http://libds.sourceforge.net/ ) but when compiling, the following is displayed by GCC 3.2 on cygwin:
    Code:
    avltree.o(.text+0x6d7):avltree.c: undefined reference to `_impure_ptr'
    avltree.o(.text+0x779):avltree.c: undefined reference to `_impure_ptr'
    avltree.o(.text+0x93a):avltree.c: undefined reference to `_impure_ptr'
    avltree.o(.text+0x9de):avltree.c: undefined reference to `_impure_ptr'
    avltree.o(.text+0xa06):avltree.c: undefined reference to `_impure_ptr'
    avltree.o(.text+0xb02):avltree.c: more undefined references to `_impure_ptr' fol
    low
    make[2]: [libds.a] Error 1 (ignored)
    What is this _impure_ptr? Do I have to worry about it?
    Thank you for your help.

  2. #2
    Registered User Casey's Avatar
    Join Date
    Jun 2003
    Posts
    47
    >>What is this _impure_ptr?
    Probably a variable used in the library.

    >>Do I have to worry about it?
    Since you're getting an error that is probably stopping compilation, yes, you have to worry about it.

  3. #3
    Registered User Sargnagel's Avatar
    Join Date
    Aug 2002
    Posts
    166
    impure_ptr is not a variable - I've checked it. It occurs in the compiled .o file but not in the source file.

    I've tested it with gcc 2.95, too, and I only get four impure_ptr ... strange.

    Finally, I've managed to compile the library with MSVC. No errors occured. I hope I can use the compiled library with GCC, too.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Getting an error with OpenGL: collect2: ld returned 1 exit status
    By Lorgon Jortle in forum C++ Programming
    Replies: 6
    Last Post: 05-08-2009, 08:18 PM
  2. Undefined Reference Compiling Error
    By AlakaAlaki in forum C++ Programming
    Replies: 1
    Last Post: 06-27-2008, 11:45 AM
  3. Screwy Linker Error - VC2005
    By Tonto in forum C++ Programming
    Replies: 5
    Last Post: 06-19-2007, 02:39 PM
  4. C OpenGL Compiler Error?
    By Matt3000 in forum C Programming
    Replies: 12
    Last Post: 07-07-2006, 04:42 PM
  5. c++ linking problem for x11
    By kron in forum Linux Programming
    Replies: 1
    Last Post: 11-19-2004, 10:18 AM